<?php
// action manage the gallery for location
$room = new Room();
$room->select($room_id);
$pictures = $room->getAllPictures();
?>
<a href="?act=edit_picture_for_room&add=1&room_id=<?php echo $room_id?>"><img src="images/add_new.gif">Thêm Hình</img></a>
<table class="tb_table" width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr class="tb_head">
	<td>Thứ tự</td>
    <td>Tên Hình</td>
    <td>Tên file</td>
    <td>Thao tác</td>
  </tr>
	<?php $index = 0; ?>
	<?php foreach ($pictures as $picture) {?>
  		<tr class="tb_content">
			<?php $index++ ?>
			<td><?php echo $index ?></td>
			<td><?php echo $picture->getdisplay_name() ?></td>
			<td><?php echo $picture->getname() ?></td>
			<td><a href="?act=edit_picture_for_room&picture_id=<?php echo $picture->getid() ?>&room_id=<?php echo $room_id?>">Sửa</a>/<a href="?act=edit_picture_for_room&picture_id=<?php echo $picture->getid() ?>&room_id=<?php echo $room_id?>&delete=yes">Xoá</a></td>
		
  		</tr>
	<?php } ?>
</table>
<a href="?act=edit_picture_for_room&add=1&room_id=<?php echo $room_id?>"><img src="images/add_new.gif">Thêm Hình</img></a>